package com.shiguiwu.springmybatis.algorithm.linkedlist;

/**
 * @description: 测试
 * @author: stone
 * @date: Created by 2021/3/4 11:48
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.linkedlist
 */
public class DoubleLinkedListTests {

    public static void main(String[] args) {

        DoubleLinkedList linkedList = new DoubleLinkedList();
//        int length = singleLinkedList.length();
        DoubleLinkedList.HeroNode node = new DoubleLinkedList.HeroNode(1, "宋江", "");
        DoubleLinkedList.HeroNode node1 = new DoubleLinkedList.HeroNode(2, "吴用", "智多星");
        DoubleLinkedList.HeroNode node2 = new DoubleLinkedList.HeroNode(5, "林冲", "豹子头");
        DoubleLinkedList.HeroNode node3 = new DoubleLinkedList.HeroNode(4, "鲁智深", "");


        linkedList.addBySort(node);
        linkedList.addBySort(node1);
        linkedList.addBySort(node2);
        linkedList.addBySort(node3);
//        singleLinkedList.print();

//        System.out.println(length);
        System.out.println("================================================");
        DoubleLinkedList.HeroNode node5 = new DoubleLinkedList.HeroNode(5, "林冲2", "豹子头2");
        linkedList.update(node5);

        linkedList.print();
        System.out.println("================================================");
        linkedList.delete(7);
//        singleLinkedList.delete(1);
//        singleLinkedList.delete(2);
//        singleLinkedList.delete(4);
//        singleLinkedList.delete(4);
        System.out.println("================================================");
        linkedList.print();



        System.out.println("================================================");
//        singleLinkedList.reverse();
//        singleLinkedList.print();

        System.out.println("================================================");


    }
}
